﻿@model Leads360Express.Repository.Pages.User.UserModel

@{
    ViewBag.Title = "Add New User";
    Layout = "~/Views/Shared/_Layout..cshtml";
}

<div id="main">
<div class="container" id="createAgentViewModel">
<form method="post" action="/User/Create" data-bind="submit: CreateAgent" class="form">        

    <fieldset>
        <div class="content">
            <h2 class="app">
				<strong>Add New User</strong>
			    @Html.Partial("_PatialLeads_Calls", @Model.LeadCall )
			</h2>
        <div class="error-msg hidden" id="errormsg" >
			 <span class="error">@ViewData["Message"]</span>
	    </div>  
        <div class="title nomargin">
				<h3>User Settings</h3>
		</div>
        <!--<div class="panel grouped-form rounded">-->
        <div class="panel rounded">
            <ul class="accordeon-tabs accordeon-2">
                <li class="open">
                    <span class="panel">
                        <div class="row">
                          <label for="text1" style="width:175px;">First Name:</label>
                          <input class="text" style="width:190px;" type="text" name="FirstName" id="FirstName" value="" data-bind="value: FirstName, attr: {maxlength: 20}" />
                        </div>
                        <div class="row">
                          <label for="text1" style="width:175px;">Last Name:</label>
                          <input class="text" style="width:190px;"  type="text" name="LastName" id="LastName" value="" data-bind="value: LastName, attr: {maxlength: 30}" />
                        </div>  
                        <div class="row" id="rowEmail">
                          <label for="text1" style="width:175px;">Email:</label>
                          <input class="text" style="width:190px;"  type="text" name="Email" id="Email" value="" data-bind="value: Email, attr: {maxlength: 100}" />
                        </div> 
                       
                        <div class="row">
                            <label for="text1" style="width:175px;">Work Phone:</label>
                            <!--<div class="groupinput">
                                <input type="hidden" class="text small" name="WorkPhone" id="WorkPhone" data-bind="value:WorkPhone" />
                                    <div class="input-holder">
                                    <input type="text" id="CellPhone1" onkeypress="return isNumberKey(event)" class="text small" data-bind="value:CellPhone1 , attr:{maxlength:3}" value="" />
		                            <span class="divider"></span>
		                            <input type="text" class="text small" id="CellPhone2" onkeypress="return isNumberKey(event)" data-bind="value:CellPhone2 , attr:{maxlength:3}" value="" />
		                            <span class="divider"></span>
		                            <input type="text" class="text middle" id="CellPhone3" onkeypress="return isNumberKey(event)" data-bind="value:CellPhone3 , attr:{maxlength:4   }" value="" />
                                    <input type="text" class="text middle" name="WorkPhoneExt" id="WorkPhoneExt" style="margin-left: 6px;" data-bind="value:WorkPhoneExt , attr:{maxlength:4}" value="" />
                                    </div>
                            </div>-->

                            <span class="phone_fields_wrapper groupinput">
                                <input type="hidden" class="hidden" id="WorkPhone" name="WorkPhone" data-bind="value: WorkPhone" />

                                <div class="input-holder-setup" style="width:210px;">
                                    <input id="cell1" class="text phone-field phone-area"type="text" data-bind="value: CellPhone1, attr:{maxlength:3}" />
                                    <span class="phone-sep">–</span>
                                    <input id="cell2" class="text phone-1" type="text" data-bind="value: CellPhone2, attr:{maxlength:3}" />
                                    <span class="phone-sep">–</span>
                                    <input id="cell3" class="text phone-2" type="text" data-bind="value: CellPhone3, attr:{maxlength:4}" />

                                    <input id="WorkPhoneExt" name="WorkPhoneExt" class="text phone-ext" type="text" value="Ext." data-bind="value: WorkPhoneExt, attr:{maxlength:8}" />
                                </div>
                            </span>

                        </div> 
                    </span>
                </li>
            </ul>
        </div>

        <h3 class="centered-wbtn centered-wbtn-bottom save">
  			<span>
  				<a href="/User" class="btn btn-cancel-page">previous</a>
				<input type="submit" class="btn btn-submit-page" data-bind="click: CreateAgent" value="Submit">
            </span>
		</h3>
       @Html.Partial("_Footer.Copyright")
</div>
    </fieldset> 
</form> 
</div> 
</div>
<script src="/Scripts/viewModel/createAgentViewModel.js" type="text/javascript"></script>
<script type="text/javascript">
    // Set allow numbers only for phone numbers
//    $("#cell1").numeric();
//    $("#cell2").numeric();
//    $("#cell3").numeric();
//    $("#WorkPhoneExt").numeric();
</script>